package com.dream.keigezhushou.Activity.acty.listen.local;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.dream.keigezhushou.Activity.view.CircleImageView;
import com.dream.keigezhushou.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class SearchMusicActivity extends AppCompatActivity implements View.OnClickListener {

    @BindView(R.id.ib_return_search_local)
    ImageView ibReturnSearchLocal;
    @BindView(R.id.rl_search_local_title)
    RelativeLayout rlSearchLocalTitle;
    @BindView(R.id.imageView2)
    CircleImageView imageView2;
    @BindView(R.id.btn_searchAll)
    Button btnSearchAll;
    @BindView(R.id.btn_searchByYourself)
    Button btnSearchByYourself;
    @BindView(R.id.l_search)
    LinearLayout lSearch;
    @BindView(R.id.tvSet)
    TextView tvSet;
    @BindView(R.id.activity_search_music)
    RelativeLayout activitySearchMusic;
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_search_music);
        ButterKnife.bind(this);

        setListener();
    }

    private void setListener() {
        ibReturnSearchLocal.setOnClickListener(this);
        btnSearchAll.setOnClickListener(this);
        btnSearchByYourself.setOnClickListener(this);
        tvSet.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.ib_return_search_local:
                finish();
                break;
            case R.id.btn_searchAll:
                Toast.makeText(this, "扫描全部", Toast.LENGTH_SHORT).show();
                intent = new Intent(SearchMusicActivity.this, SearchAllcdActivity.class);
                startActivity(intent);
                finish();

                break;
            case R.id.btn_searchByYourself:
                Toast.makeText(this, "自定义扫描", Toast.LENGTH_SHORT).show();
                intent = new Intent(SearchMusicActivity.this, SearchYourselfActivity.class);
                startActivity(intent);
                finish();
                break;
            case R.id.tvSet:
                intent = new Intent(SearchMusicActivity.this, SearchForSetActivity.class);
                startActivity(intent);
                finish();
                break;

        }
    }
}
